package com.shelpe.services.simbasync.dao;

import com.shelpe.services.simbasync.model.RptCampaign;
import com.shelpe.services.simbasync.model.RptCampaignExample;
import com.shelpe.services.simbasync.model.RptCampaignKey;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface RptCampaignMapper {
    int countByExample(RptCampaignExample example);

    int deleteByExample(RptCampaignExample example);

    int deleteByPrimaryKey(RptCampaignKey key);

    int insert(RptCampaign record);
    
    int insertBatch(List<RptCampaign> list);

    int insertSelective(RptCampaign record);

    List<RptCampaign> selectByExample(RptCampaignExample example);

    RptCampaign selectByPrimaryKey(RptCampaignKey key);

    int updateByExampleSelective(@Param("record") RptCampaign record, @Param("example") RptCampaignExample example);

    int updateByExample(@Param("record") RptCampaign record, @Param("example") RptCampaignExample example);

    int updateByPrimaryKeySelective(RptCampaign record);

    int updateByPrimaryKey(RptCampaign record);
    
    Date getLastTimeFromRpt(Long userId);
    
    Date getLastTimeFromRptByCampaign(@Param("user_id") long userId, @Param("campaign_id") long campaignId);
}